//package com.xingkeduo.util;
//
//import javax.websocket.Session;
//
//import com.xingkeduo.pojo.ShopSession;
//import com.xingkeduo.pojo.ShopSessionTjo;
//
//public class SendUtil {
//	public static void sendMessageTo(ShopSession shopSession) throws Throwable {
//		for (ShopSession item : ConstUtil.CLIENTS.values()) {
//			if (item.getShopName().equals(shopSession.getShopName())) {
//				sendMessage(item.getSession(), ShopSessionTjo.toJson(shopSession).toString());
//				break;
//			}
//		}
//	}
//
//	public static void sendMessageAll(ShopSession shopSession) throws Throwable {
//		for (ShopSession item : ConstUtil.CLIENTS.values()) {
//			sendMessage(item.getSession(), ShopSessionTjo.toJson(shopSession).toString());
//		}
//	}
//
//	public static void sendMessageToMonitor(ShopSession shopSession) throws Throwable {
//		for (Session item : ConstUtil.MONITORS.values()) {
//			sendMessage(item, ShopSessionTjo.toJson(shopSession).toString());
//		}
//	}
//
//	public static void sendMessage(Session session, String message) {
//		session.getAsyncRemote().sendText(message);
//	}
//}
